﻿@page "/Unsubscribe"
<h3>退餐</h3>
<p>可以取消预定见下表（已经超过可取消时限的订单未显示）</p>
<Table TItem="BlazorOrdering.Core.Order"
       IsStriped="true" IsBordered="true"
       ShowToolbar="true"
       ShowDefaultButtons="false" ClickToSelect="true"
       ShowExtendButtons="true"
       Items="@orders">
    <TableColumns>
        <TableColumn @bind-Field="@context.Day" Width="180" FormatString="yyyy年MM月dd日 dddd" />
        <TableColumn @bind-Field="@context.Total" Width="100" />
        <TableColumn @bind-Field="@context.HasBreakfast">
            <Template Context="v">
                <Switch IsDisabled="true" Value="v.Value" ShowInnerText="true" OnInnerText="是" OffInnerText="否" />
            </Template>
        </TableColumn>
    </TableColumns>
    <RowButtonTemplate>
        <TableCellButton Size="Size.None" Color="Color.Danger"
                         TItem="BlazorOrdering.Core.Order"
                         Item="@context" Icon="fa fa-remove" Text="退订"
                         OnClickCallback="@OnRowButtonClick" IsOutline="true" />
    </RowButtonTemplate>
</Table>


<Message @ref="MessageElement" />
